package com.zzz.demo.listener;

import org.springframework.context.annotation.Configuration;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * 类名称 SessionListener
 * session监听器
 * @create 2018-07-24 15:14
 * modify by
 **/
@WebListener
public class SessionListener implements HttpSessionListener {
    public static final String JSESSIONID = "JSESSIONID";

    @Override
    public void sessionCreated(HttpSessionEvent httpSessionEvent) {
        System.out.println(Thread.currentThread().getName() + ":session created...........");
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
        System.err.println("session has been destoryed...........");
    }

}
